import Vue from 'vue'
import Vuex from 'vuex'
import vuexI18n from 'vuex-i18n'
import vux from './modules/vux'

Vue.use(Vuex);

const debug = process.env.NODE_ENV !== 'production'

let store = new Vuex.Store({
	modules: {
		i18n: vuexI18n.store,
		vux: vux
	},
	strict: debug,
})

Vue.use(vuexI18n.plugin, store);
/*
store.registerModule('vux', {
	state: {
		isLoading: false,
		direction: 'forward'
	},
	mutations: {
		updateLoadingStatus(state, payload) {
			state.isLoading = payload.isLoading
		},
		updateDirection(state, payload) {
			state.direction = payload.direction
		}
	}
})
*/
export default store;
